var a = require("../../../../@babel/runtime/helpers/defineProperty"), t = getApp();

Component({
    options: {
        styleIsolation: "isolated"
    },
    properties: {
        broadcast_data: {
            type: null
        },
        goodsType: {
            type: null
        }
    },
    observers: {},
    data: {
        page: 1,
        morePage: null
    },
    methods: {
        bindChange: function(a) {
            if ("autoplay" == a.detail.source && a.detail.current == this.data.broadcast_data.data.length - 8) {
                if (this.data.broadcast_data.current_page >= this.data.broadcast_data.last_page) return void console.log("没有更多");
                this.setData({
                    page: this.data.page + 1
                }), this.zhpBroadcast();
            }
        },
        zhpBroadcast: function() {
            var e = this, s = t.getNetAddresss("plugin.zhp-group-lottery.frontend.goods.get-window-list");
            t._getNetWork({
                url: s,
                data: {
                    activity_id: this.data.broadcast_data.goodsId,
                    page: this.data.page
                },
                success: function(t) {
                    var s = t.data;
                    if (1 == s.result) {
                        var d = e.data.broadcast_data.data.concat(s.data.data);
                        e.setData(a({
                            morePage: s.data.last_page
                        }, "broadcast_data.data", d));
                    } else wx.showToast({
                        icon: "none",
                        title: s.msg,
                        duration: 1500
                    });
                }
            });
        }
    }
});